function [a,s,v] = calc(Y)
    [yh,yw] = size(Y);
    index = 1;
    CountY = zeros(1,yh*yw);
    for k=1:yh
     for l=1:yw
        CountY(index) = Y(k,l);
        index = index + 1;
     end
    end
    average = mean(CountY);
    sample_variance = var(CountY);
    variance = sum((CountY(1,:)-mean(CountY)).^2)/length(CountY);
    %[a,s,v] = [average,sample_variance,variance];
    a = average;
    s = sample_variance;
    v = variance;
end